import Layout from '@/layout'

/* 征信路由模块 */
const creditRouter = [
    /* 系统首页 */
    {
        path: '/manager',
        name: 'Manager',
        component: Layout,
        redirect: '/manager/index',
        meta: {
            title: '系统首页',
            icon: 'peoples',
            roles: ['CREDIT','CREDIT_ADMIN']
        },
        children: [{
            path: 'index',
            component: () => import('@/views/dashboard/index'),
            name: '/manager/index',
            meta: {
                title: '系统首页',
                icon: 'home',
            }
        }] 
    },
    /* 金融风控分析 */
    {
        path: '/analysis',
        name: 'Analysis',
        component: Layout,
        redirect: '/analysis/basics',
        meta: {
            title: '金融风控分析',
            icon: 'home',
            roles: ['CREDIT','CREDIT_ADMIN']
        },
        children: [{
            path: 'basics',
            component: () => import('@/views/roles/admin/analysis/basics'),
            name: '/analysis/basics',
            meta: {
                title: '贷款基本面',
            }
        },{
            path: 'badBasics',
            component: () => import('@/views/roles/admin/analysis/badBasics'),
            name: '/analysis/badBasics',
            meta: {
                title: '不良贷款风险',
            }
        },{
            path: 'guarantee',
            component: () => import('@/views/roles/admin/analysis/guarantee'),
            name: '/analysis/guarantee',
            meta: {
                title: '融资担保',
            }
        },{
            path: 'details',
            component: () => import('@/views/roles/admin/analysis/details'),
            name: '/analysis/details',
            meta: {
                title: '风控明细',
            }
        }]
    },
    {
        path: '/a_work',
        name: 'AWork',
        component: Layout,
        redirect: '/a_work/auth_manage',
        meta: {
            title: '工作台',
            icon: 'work',
            roles: ['CREDIT'],
        },
        children: [
            {
                path: 'auth_manage',
                name: '/a_work/auth_manage',
                component: () => import('@/views/roles/admin/work/auth_manage'),
                meta: {
                    title: '授权协议管理',
                }
            },
            /* {
                path: 'auth_examine',
                name: '/a_work/auth_examine',
                component: () => import('@/views/roles/admin/work/auth_examine'),
                meta: {
                    title: '授权协议审核',
                }
            }, */
            {
                path: 'auth_records',
                name: '/a_work/auth_records',
                component: () => import('@/views/roles/admin/work/auth_records'),
                meta: {
                    title: '授权任务',
                }
            },
        ]
    },
    {
        path: '/a_work',
        name: 'AWork',
        component: Layout,
        redirect: '/a_work/auth_examine',
        meta: {
            title: '工作台',
            icon: 'work',
            roles: ['CREDIT_ADMIN'],
        },
        children: [
            /* {
                path: 'auth_manage',
                name: '/a_work/auth_manage',
                component: () => import('@/views/roles/admin/work/auth_manage'),
                meta: {
                    title: '授权协议管理',
                }
            }, */
            {
                path: 'auth_examine',
                name: '/a_work/auth_examine',
                component: () => import('@/views/roles/admin/work/auth_examine'),
                meta: {
                    title: '授权协议审核',
                }
            },
            {
                path: 'auth_records',
                name: '/a_work/auth_records',
                component: () => import('@/views/roles/admin/work/auth_records'),
                meta: {
                    title: '授权任务',
                }
            },
        ]
    },
    /* 企业画像 */
    {
        path: '/portray',
        name: 'Portray',
        component: Layout,
        redirect: '/portray/index',
        meta: {
            title: '企业画像',
            icon: 'portrait',
            roles: ['CREDIT','CREDIT_ADMIN']
        },
        children: [{
            path: 'index',
            component: () => import('@/views/dashboard/portray'),
            name: '/portray/index',
            meta: {
                title: '画像查询',
            }
        }]
    },
    /* 企业评估 */
    {
        path: '/assess',
        name: 'Assess',
        component: Layout,
        redirect: '/assess/index',
        meta: {
            title: '企业评估',
            icon: 'portrait',
            roles: ['CREDIT','CREDIT_ADMIN']
        },
        children: [{
            path: 'index',
            component: () => import('@/views/dashboard/assess'),
            name: '/assess/index',
            meta: {
                title: '企业评估',
            }
        }]
    },
    /* 风险预警 */
    {
        path: '/credit',
        name: 'Credit',
        component: Layout,
        redirect: '/credit/extend_list',
        meta: {
            title: '风险预警',
            icon: 'credit',
            roles: ['CREDIT','CREDIT_ADMIN']
        },
        children: [{
            path: 'extend_list',
            component: () => import('@/views/roles/editor/customer/credit'),
            name: '/credit/extend_list',
            meta: {
                title: '风险预警',
            }
        }]
    },
    /* 额度查询 */
    {
        path: '/limit',
        name: 'Limit',
        component: Layout,
        redirect: '/limit/credit_list',
        meta: {
            title: '额度查询',
            icon: 'limit',
            roles: ['CREDIT','CREDIT_ADMIN']
        },
        children: [{
            path: 'credit_list',
            component: () => import('@/views/roles/editor/customer/limit'),
            name: '/limit/credit_list',
            meta: {
                title: '额度查询',
            }
        }],
    },
    // {
    //     path: '/c_xzgl',
    //     name: 'CXzgl',
    //     component: Layout,
    //     redirect: '/c_xzgl/index',
    //     meta: {
    //         title: '下载管理',
    //         icon: 'order',
    //         roles: ['CREDIT'],
    //     },
    //     children: [{
    //         path: 'index',
    //         component: () => import('@/views/error-page/404'),
    //         name: '/c_xzgl/index',
    //         meta: {
    //             title: '下载管理',
    //         }
    //     }]
    // },
    /* 系统权限 */
    /* {
        path: '/c_permission',
        name: 'CPermission',
        component: Layout,
        redirect: '/c_permission/institution_list',
        meta: {
            title: '系统权限',
            icon: 'super',
            roles: ['CREDIT'],
        },
        children: [{
                path: 'institution_list',
                name: '/c_permission/institution_list',
                component: () => import('@/views/roles/super/institution'),
                meta: {
                    title: '组织机构',
                }
            },
            {
                path: 'user_list',
                name: '/c_permission/user_list',
                component: () => import('@/views/roles/super/user'),
                meta: {
                    title: '用户管理',
                }
            },
            {
                path: 'role_list',
                name: '/c_permission/role_list',
                component: () => import('@/views/roles/super/role'),
                meta: {
                    title: '角色管理',
                }
            },
        ]
    }, */
]

export default creditRouter
